Embedding a Hardware Description Language in Template Haskell
نویسنده
چکیده
Hydra is a domain-specific language for designing digital circuits, which is implemented by embedding within Haskell. Many features required for hardware specification fit well within functional languages, leading in many cases to a perfect embedding. There are some situations, including netlist generation and software logic probes, where the DSL does not fit exactly within the host functional language. A new solution to these problems is based on program transformations performed automatically by metaprograms in Template Haskell.
منابع مشابه
Embedding a Hardware Description Language in a Functional Meta-Programming Language
General purpose functional languages such as Haskell, have been widely used as host languages for the embedding of domain specific languages. In particular, various hardware description languages have been successfully embedded in Haskell and other functional languages. More recently, meta-programming languages have also started being used for the embedding of such languages, where the meta-lan...
متن کاملAn Embedded Language Framework for Hardware Compilation
Various languages have been proposed to describe synchronous hardware at an abstract, yet synthesisable level. We propose a uniform framework within which such languages can be developed, and combined together for simulation, synthesis, and verification. We do this by embedding the languages in Lava — a hardware description language (HDL), itself embedded in the functional programming language ...
متن کاملDSL Implementation in MetaOCaml, Template Haskell, and C++
A wide range of domain-specific languages (DSLs) has been implemented successfully by embedding them in general purpose languages. This paper reviews embedding, and summarizes how two alternative techniques—staged interpreters and templates—can be used to overcome the limitations of embedding. Both techniques involve a form of generative programming. The paper reviews and compares three program...
متن کاملHeDLa: A Strongly Typed, Component-Based Embedded Hardware Description Language
Over the past years, various techniques for the embedding of hardware description languages within general purpose languages have been developed and explored. In particular, numerous HDLs embedded in strongly typed functional languages have been developed and used for different applications. A common trait of most of these languages is that they treat hardware components as functions or relatio...
متن کاملImplementing Explicit and Finding Implicit Sharing in Embedded DSLs
Aliasing, or sharing, is prominent in many domains, denoting that two differently-named objects are in fact identical: a change in one object (memory cell, circuit terminal, disk block) is instantly reflected in the other. Languages for modelling such domains should let the programmer explicitly define the sharing among objects or expressions. A DSL compiler may find other identical expressions...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003